package com.system.domain;

import java.io.Serializable;
import java.util.List;

/**
 * @author duanfeixiang
 * @create 2020-12-22 8:39
 */

/**
 * PageBean实体类对象用来存储分页数据
 */
public class PageBean implements Serializable{//序列化

    //当前页面
    private int pageCode;

    //总页数=总记录数/每页显示的记录数
    private int totalPage;

    //总记录数
    private int totalCount;

    //每页显示记录数
    private int pageSize;

    //用一个集合存储购物车对象
    private List<Cart> cartList;

    //用于存储手机对象


    public PageBean() {
    }

    public PageBean(int pageCode, int totalPage, int totalCount, int pageSize, List<Cart> cartList) {
        this.pageCode = pageCode;
        this.totalPage = totalPage;
        this.totalCount = totalCount;
        this.pageSize = pageSize;
        this.cartList = cartList;
    }

    public int getPageCode() {
        return pageCode;
    }

    public void setPageCode(int pageCode) {
        this.pageCode = pageCode;
    }

    public int getTotalPage() {
        return totalPage;
    }

    public void setTotalPage(int totalPage) {
        this.totalPage = totalPage;
    }

    public int getTotalCount() {
        return totalCount;
    }

    public void setTotalCount(int totalCount) {
        this.totalCount = totalCount;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public List<Cart> getCartList() {
        return cartList;
    }

    public void setCartList(List<Cart> cartList) {
        this.cartList = cartList;
    }

    @Override
    public String toString() {
        return "PageBean{" +
                "pageCode=" + pageCode +
                ", totalPage=" + totalPage +
                ", totalCount=" + totalCount +
                ", pageSize=" + pageSize +
                ", cartList=" + cartList +
                '}';
    }
}
